package java1.myFile;

import java.util.Collection;

/**
 * Created by asus on 2017/9/6.
 */
public class PPrint {
    public static String pformat(Collection<?> c){
        StringBuilder sb=new StringBuilder("[");
        for(Object item:c){
            if(c.size()>1){
                sb.append("\n  ");
            }
            sb.append(item);
        }
        if(c.size()>1){
            sb.append("\n  ");
        }
        sb.append("]");
        return sb.toString();
    }
}
